import Vue from 'vue'
import Router from 'vue-router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import login from '@/components/login'
import index from '@/components/index'
import approval from '@/components/sub-div/approval'
import checkbed from '@/components/sub-div/checkbed'
import checkin from '@/components/sub-div/checkin'
import choosebed from '@/components/sub-div/choosebed'
import foodcalendar from '@/components/sub-div/foodcalendar'
import fooddistribute from '@/components/sub-div/fooddistribute'
import goout from '@/components/sub-div/goout'
import leave from '@/components/sub-div/leave'
import nursingchoose from '@/components/sub-div/nursingchoose'
import nursingcontent from '@/components/sub-div/nursingcontent'
import nursingrecord from '@/components/sub-div/nursingrecord'
import usermanager from '@/components/sub-div/usermanager'
import nursingconfig from '@/components/sub-div/nursingconfig'
import leaveapproval from '@/components/sub-div/leaveapproval'
Vue.use(Router)
Vue.use(ElementUI)

/*配置所有视图的路径
* */
export default new Router({
    routes:[
        {
       path:'/',
       name:'login',
       component:login
    },
        {
       path: '/index',
       name:'index',
       component: index,
            children:[{
                path: 'sub-div/approval',
                name:'approval',
                component: approval},
                {
                    path: 'sub-div/checkbed',
                    name:'checkbed',
                    component: checkbed},
                {
                    path: 'sub-div/choosebed',
                    name:'choosebed',
                    component: choosebed},
                {
                    path: 'sub-div/foodcalendar',
                    name:'foodcalendar',
                    component: foodcalendar},
                {
                    path: 'sub-div/fooddistribute',
                    name:'fooddistribute',
                    component: fooddistribute},
                {
                    path: 'sub-div/goout',
                    name:'goout',
                    component: goout},
                {
                    path: 'sub-div/leave',
                    name:'leave',
                    component: leave},
                {
                    path: 'sub-div/nursingchoose',
                    name:'nursingchoose',
                    component: nursingchoose},
                {
                    path: 'sub-div/nursingcontent',
                    name:'nursingcontent',
                    component: nursingcontent},
                {
                    path: 'sub-div/nursingrecord',
                    name:'nursingrecord',
                    component: nursingrecord},
                {
                    path: 'sub-div/usermanager',
                    name:'usermanager',
                    component: usermanager},
                {
                    path:'sub-div/checkin',
                    name:'checkin',
                    component:checkin,
                },
                {
                    path:'sub-div/nursingconfig',
                    name:'nursingconfig',
                    component:nursingconfig,
                },
                {
                    path:'sub-div/leaveapproval',
                    name:'leaveapproval',
                    component:leaveapproval,
                },
            ]
    },

]
})
